import { GCellRenderer } from "../../../../../com/mui/controls/GCellRenderer";
import { ObjCreate } from "../../common/ObjCreate";
import { ImagesConst } from "../../../resource/ImagesConst";
import { BaseItem } from "../../common/BaseItem";
import { SPlayerItem } from "../../../../../Message/Public/SPlayerItem";
import { ItemData } from "../../../resource/info/ItemData";
//class PloughResultItem
    
    export  class PloughResultItem extends GCellRenderer
    {
        constructor()
        {
            super();
            return;
        }

        protected /* override */ configUI(): void
        {
            ObjCreate.createBitmap(ImagesConst.PackItemBg, 3, 3, this);
            this._item = new BaseItem();
            this._item.setSize(32, 32);
            this._item.move(6, 6);
            this._item.isDropAble = false;
            addChild(this._item);
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            var loc1=null;
            super.data = arg1;
            if (arg1 && arg1 is SPlayerItem) 
            {
                loc1 = new ItemData(arg1 as SPlayerItem);
                this._item.itemData = loc1;
            }
            else 
            {
                this._item.itemData = null;
            }
            return;
        }

        protected /* var */_item: BaseItem;
    }
